/* Show a message in a slide down div */
function showMsg(msg){
	$('#msg-pane').slideUp().fadeOut();
	$('#msg-pane').html("");
	$('#msg-pane').html(msg);
	$('#msg-pane').slideDown().fadeIn();
}
/* Highlight border of an input controller */
function highlightControl(id){
	$("#"+id).addClass('highlight-boder');
}
function removeHighlight(id){
$("#"+id).removeClass('highlight-boder');
}

function scrollToTop(){
	$('html, body').stop().animate({
    	scrollTop: 0
    }, 500);
}

jQuery(function($) {
	// $("#forgot_pass").bind('click', function(e){
		// e.preventDefault();
	// });
	$("#update_search").bind('click', function(){
		jQuery.ajax({
		url: 'save_search_data.php',
		type: "POST",
		data: '',
		success: function(data) {
			showMsg(data); 
		}
		});	
	})
});

function searchForm(msg){
	if($('#search').val()==""){
		showMsg(msg);
		$('#search').focus();
		return false;
	}
	location.href = "search_results.php?searchStr="+$('#search').val();
}

function searchGspec(msg){
	if($('#gspecsearch').val()==""){
		showMsg(msg);
		$('#gspecsearch').focus();
		return false;
	}
	//alert("product_garment_specs.php?searchStr=");
	location.href = "product_garment_specs.php?searchStr="+$('#gspecsearch').val();
}